From: Colin Walters Date: Tue, 8 Sep 2009 21:53:45 +0000 (-0400) Subject: [AppWell] Position menu components on integral coordinates X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~10948 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ef6ea078ddcb2ed2d733f39e1b526d7f23e5e6df;p=gnome-shell.git [AppWell] Position menu components on integral coordinates This avoids fuzz. http://bugzilla.gnome.org/show_bug.cgi?id=594553 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 629becfff..58948ff4c 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -533,7 +533,7 @@ WellMenu.prototype = { childBox.x1 = 0; childBox.x2 = WELL_MENU_ARROW_SIZE; - childBox.y1 = (height / 2) - (WELL_MENU_ARROW_SIZE / 2); + childBox.y1 = Math.floor((height / 2) - (WELL_MENU_ARROW_SIZE / 2)); childBox.y2 = childBox.y1 + WELL_MENU_ARROW_SIZE; this._arrow.allocate(childBox, flags); @@ -622,8 +622,9 @@ WellMenu.prototype = { this.emit('popup', true); + let x = Math.floor(stageX + stageWidth); let y = Math.floor(stageY + (stageHeight / 2) - (this.actor.height / 2)); - this.actor.set_position(stageX + stageWidth, y); + this.actor.set_position(x, y); this.actor.show(); },